package com.whlilong.jxc.ui.provider;

import org.eclipse.jface.resource.FontRegistry;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;

import com.whlilong.jxc.model.Selldetail;

public class ClientGoodsInfoLableProvider implements ITableLabelProvider {

	@Override
	public Image getColumnImage(Object element, int columnIndex) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getColumnText(Object element, int columnIndex) {
		if (element instanceof Selldetail) {
			Selldetail goodsInfo = (Selldetail) element;
			switch (columnIndex) {
			case 0:
				return goodsInfo.getGoodsid();
			case 1:
				return goodsInfo.getGoodsname();
			case 2:
				return "";
			case 3:
				return String.valueOf(goodsInfo.getCout());
			case 4:
				return String.valueOf(goodsInfo.getDiscountmoney());
			case 5:
				return String.valueOf(goodsInfo.getSellprice());
			case 6:
				return String.valueOf(goodsInfo.getMoney());
			}
			
		}
		return null;
	}
	@Override
	public void addListener(ILabelProviderListener listener) {
		// TODO Auto-generated method stub

	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub

	}

	@Override
	public boolean isLabelProperty(Object element, String property) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void removeListener(ILabelProviderListener listener) {
		// TODO Auto-generated method stub

	}

}
